$(function () {
    window.onload = function () {
        $.ajax({
            url: 'http://localhost:3000/play/new',
            method: 'get',
            success: function (res) {
                var sdd = [];
                var str = '';
                for (var i = 0; i < 3; i++) {
                    sdd.push(res[i])
                    console.log(sdd);
                }
                $.each(sdd, function (index, item) {
                    $.each(item,function(index, item1){
                        str += "<li class=report>" +
                        "<img src=" + item1.img + ">" +
                        "<div class=wen>" + item1.text + "</div>" +
                        "<div class=comment>" + item1.price +
                        "<span>" + "<img src=../img/css-img/img/xin.png>3&nbsp;&nbsp;" + "<img src=../img/css-img/img/zan.png>&nbsp;&nbsp;3" + "</span>" +
                        "</div>" +
                        "</li>";
                    })  
                })
                $('.content-box').html(str);
            }
        })
        $('.content-box5').click(function(){
            $('.content-box').css('height','1390px');
            $('.both-box').css('height','1500px');
            $('.content-box5').hide();
        })
    }
})